package com.lyrcsoft;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Programs {
	public static void main(String[] args) {
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext();
		context.scan("com.lyrcsoft");
		context.refresh();
		context.start();

		//Person person = context.getBean("person", Person.class);
		//System.out.println("person"+person);
		MessageListener listener = context.getBean(MessageListener.class);
		for (int i = 0; i < 3; i++) {
			listener.onRecive("hello world");
		}
		context.registerShutdownHook();
		context.stop();
	}
}
